<template>
	<view class="top-select-view flex a-i-c" :class="isAround?'j-c-a':''">
		<block v-for="(item, index) in list" :key="index">
			<view @click="backData(item,index)" class="item flex a-i-c f-s-26 color-696969" :class="isAround?'':'mar-r'">
				{{item.children_name?item.children_name:item.title}}
				<image class="icon" src="@/static/images/showmore-icon.svg" mode=""></image>
			</view>
		</block>
	</view>
</template>

<script>
	export default {
		name:"topSelect",
		props:{
			isAround:{
				type:Boolean,
				default(){
					return true
				}
			},
			list:{
				type:Array,
				default(){
					return []
				}
			},
		},
		data() {
			return {
				
			};
		},
		methods:{
			backData(item,index){
				// this.list[index].children_name = this.list[index].title
				console.log(item,index,"item,index")
				this.$emit('backData',{
					item,index
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.top-select-view{
		width: 100%;
		.item{
			.icon{
				width: 20upx;
				height: 20upx;
				margin-left: 8upx;
			}
		}
	}
	.mar-r{
		margin-right: 58upx;
	}
</style>